<?php
/**
 * @category Goatherd
 * @package Goatherd
 *
 * @author Copyright (c) 2012 Maik Penz <maik@phpkuh.de>
 * @version $Id: Version.php 106 2012-06-15 21:11:38Z maik@phpkuh.de $
 *
 * This file is part of Goatherd library.
 *
 * Goatherd library is free software: you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * Goatherd library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with Goatherd library. If not, see <http://www.gnu.org/licenses/>.
 */
namespace Goatherd;


/**
 * Library version and name.
 *
 * @category Goatherd
 * @package Goatherd
 * @subpackage Version
 */
final class Version
{
    /**
     * Library name
     *
     * @var string
     */
    const NAME = "Goatherd library";

    /**
     * Library version string
     *
     * @var srtring
     */
    const VERSION = "1.0.6-alpha";

    /**
     *
     * @param string $version
     * @return int
     */
    public static function compareVersion($version)
    {
        return version_compare(strtolower($version), self::VERSION);
    }
}